// @ts-ignore
/* eslint-disable */
import { request } from 'umi';

/** 返回未登录用户默认路由信息 GET /api/getAnonymousRouters */
export async function loginGetAnonymousRoutersUsingGET(options?: { [key: string]: any }) {
  return request<Record<string, any>>('/api/getAnonymousRouters', {
    method: 'GET',
    ...(options || {}),
  });
}

/** 获取用户信息 GET /api/getInfo */
export async function loginGetInfoUsingGET(options?: { [key: string]: any }) {
  return request<Record<string, any>>('/api/getInfo', {
    method: 'GET',
    ...(options || {}),
  });
}

/** 获取路由信息 GET /api/getRouters */
export async function loginGetRoutersUsingGET(options?: { [key: string]: any }) {
  return request<Record<string, any>>('/api/getRouters', {
    method: 'GET',
    ...(options || {}),
  });
}

/** 登录 POST /api/login */
export async function loginUsingPOST(body: API.LoginBody, options?: { [key: string]: any }) {
  return request<Record<string, any>>('/api/login', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
